<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/css/plugins/layui/css/layui.css}">
</head>

<body>
<div class="layui-form" th:object="${grade}">
    <!--隐藏域-->
    <input type="hidden" id="gradeId" th:field="*{gradeId}">
    <div class="layui-form-item">
        <label class="layui-form-label">年级名称</label>
        <div class="layui-input-inline layui-input-wrap">
            <input type="text" id="gradeName" th:field="*{gradeName}" lay-verify="required" autocomplete="off" lay-affix="clear" class="layui-input">
        </div>
        <!--th:field获取值-->
    </div>
</div>
<script th:src="@{/js/plugins/layui/layui.js}"></script>
<script th:src="@{/js/jquery.min.js}"></script>
</body>
</html>